package com.cgmnx.admin.dao.mapper.rbac;

import com.cgmnx.admin.common.bean.Limiter;
import com.cgmnx.admin.dao.condition.LogCondition;
import com.cgmnx.admin.dao.entity.rbac.OperationLogEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 权限模块的日志
 *
 * @author created on 14-3-12 下午4:14
 * @version $Id$
 */@Repository
public interface OperationLogMapper {

    /**
     * 保存日志
     *
     * @param entity
     * @return
     */
    int save(OperationLogEntity entity);

    /**
     * 批量保存日志
     *
     * @param entityList
     * @return
     */
    int saveAll(@Param("entityList") List<OperationLogEntity> entityList);

    /**
     * 查询日志
     *
     * @param entity
     * @return
     */
    List<OperationLogEntity> query(@Param("entity") OperationLogEntity entity);

    /**
     * 分页查询日志信息
     *
     * @param condition
     * @param limiter
     * @return
     */
    List<OperationLogEntity> queryPage(@Param("condition") LogCondition condition, @Param("limiter") Limiter limiter);

    /**
     * 统计符合条数的日志
     *
     * @param condition
     * @return
     */
    int count(@Param("condition") LogCondition condition);

}
